from django.urls import path

from qa import views
from qa.views import QaPairListCreate, QaPairRetrieveUpdateDestroy, add_qa_pair, delete_qa_pair, update_qa_pair, \
    ScenicSpotListCreateAPIView, add_scenic_spot, update_scenic_spot, delete_scenic_spot, AdminListCreateAPIView, \
    DataTicketCreateView, DataTicketListView, update_data_ticket, delete_data_ticket, DataTicketListView1, \
    reject_data_ticket, re_data_ticket, get_scenic_spot_types, get_scenic_spot_types1, workflow, \
    SubmitterListCreateAPIView

urlpatterns = [
    #问答对相关信息
    path('qa-pairs/',  QaPairListCreate.as_view(), name='qa-pairs-list-create'),#查询问答对
    path('addqa-paired/', add_qa_pair, name='add-qa-pair'),#添加问答对
    path('delete/<int:qa_id>/', delete_qa_pair,name='delete_qa_pair'),#删除问答对
    path('update/<int:qa_id>/', update_qa_pair, name='update_qa_pair'),#,#修改问答对
    #景区相关信息
    path('scenic-spots/', ScenicSpotListCreateAPIView.as_view(), name='scenic-spot-list-create'),
    path('scenic-spotsadd/', add_scenic_spot, name='scenic-spot-add'),
    path('scenic-spots/update/<str:jq_id>/', update_scenic_spot, name='update_scenic_spot'),
    path('scenic-spots/delete/<str:jq_id>/', delete_scenic_spot, name='delete_scenic_spot'),
    #管理员相关信息
    path('admins/', AdminListCreateAPIView.as_view(), name='admin-list-create'),
    path('add-scenic-spot/', views.add_scenic_spot1, name='add_scenic_spot'),
    path('update-scenic-spot/<str:admin_id>/', views.update_admin, name='update_scenic_spot'),
    path('delete-scenic-spot/<str:admin_id>/', views.delete_scenic_spot1, name='delete_scenic_spot'),
    #用户相关信息
    path('submitters/', SubmitterListCreateAPIView.as_view(), name='admin-list-create'),
    path('add-scenic-spot/', views.add_scenic_spot1, name='add_scenic_spot'),
    path('update_submitter/<str:submitter_id>/', views.update_submitter, name='update_scenic_spot'),
    path('delete_submitter/<str:submitter_id>/', views.delete_submitter, name='delete_scenic_spot'),
    path('register/', views.register, name='register'), #注册页面
    path('login/', views.login, name='login'),#登录页面
    #普通用户提交问答对
    path('data-tickets/add/', DataTicketCreateView.as_view(), name='data-ticket-create'),#申请提交订单
    path('data-tickets/', DataTicketListView.as_view(), name='data-ticket-list'),#获取该用的提交问答对
    path('update-data-ticket/<int:ticket_id>/', update_data_ticket, name='update_data_ticket'),#修改提交的问答对
    path('delete-data-ticket/<int:ticket_id>/', delete_data_ticket, name='delete_data_ticket'),#删除问答对
    path('data-tickets1/', DataTicketListView1.as_view(), name='data-ticket-list'),
    path('reject_data_ticket/<int:ticket_id>/', reject_data_ticket, name='data-ticket-list'),#驳回
    path('re_data_ticket/<int:ticket_id>/', re_data_ticket, name='data-ticket-list'),#接受
    path('get-scenic-spot-types/', get_scenic_spot_types, name='get-scenic-spot-types'),
    path('get-scenic-spot-types1/', get_scenic_spot_types1, name='get-scenic-spot-types'),
    path('workflow/',workflow,name='workflow'),
    path('export-data/', views.export_data, name='export_data'),#导出数据
    path('knowledge-graph/', views.knowledge_graph, name='knowledge-graph'),
]
